package org.example.auth.controller;

import org.example.auth.service.VxLoginService;
import org.example.core.utils.R;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 小杰_cc
 * @version 1.0
 */

@RestController
@RequestMapping("/auth/vx")
public class VxLoginController {

    @Autowired
    private VxLoginService vxLoginService;

    /**
     * 通过vx提供的功能获取用户手机号快速登录
     */
    @PostMapping("/login")
    public R<?> vxLogin(@RequestBody String code){
        return vxLoginService.vxLogin(code);
    }

}
